<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>书籍管理 </title>
<@fm.header />
<script type="text/javascript" src="/resources/js/common.js"></script>
<script type="text/javascript" src="/resources/js/book/book.js"></script>
</head>
<body class="cmp-list-body">

<div id="tb" style="padding:3px">
    <span>mark</span>
	<input id="smark" class="easyui-textbox" style="width: 155px;"/>
	<span>书名</span>
	<input id="sname" class="easyui-textbox" style="width: 155px;"/>
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch();">查询</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="doAdd();">新增</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="doEdit();">修改</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="doDel();">删除</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="doRevert();">恢复可下载次数</a>
    <span>下次恢复时间</span>
    <input class="easyui-datetimebox" id="time" panelHeight="auto" style="line-height:20px;border:1px solid #ccc;width:155px;" data-options="required:true"/>
    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="updateTime();">更新时间</a>
    <form id="uploadForm" method="post" enctype="multipart/form-data">
	<span>Excel导入</span><input type="file" name="excelFile" id="excelFile"></input>
    <a href="#" class="easyui-linkbutton" iconCls="icon-import" plain="true" onclick="doImport();">导入</a>
    <a href="#" class="easyui-linkbutton" id="exportData" iconCls="icon-export" plain="true" onclick="exportExcel();">导出</a> 
	</form>
	<form id="ff" method="post">
    	<input type="hidden" id="emark" name="mark">
		<input type="hidden" id="ename" name="name">
    </form>
</div>
<table id="tt" title="书籍管理 " 
	 toolbar="#tb" rownumbers="true" 
	singleSelect="false" pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]">  
    <thead>
        <tr>
            <th align="center" width="10%" field="id" checkBox="true"></th>
		    <th align="center" width="20%" field="name">书名</th>
		    <th align="center" width="10%" field="chapter">章节</th>
		    <th align="center" width="10%" field="status" formatter="formatStatus">状态</th>
		    <th align="center" width="10%" field="createDate">创建时间</th>
		    <th align="center" width="10%" field="modifyDate">修改时间</th>
        </tr>
    </thead>   
</table>

<div id="addWin" class="easyui-window" title="书籍管理|新增修改" closed="true" collapsible="false" minimizable="false"  maximizable="false" style="width:500px;height:450px"   
        data-options="iconCls:'icon-save',modal:true">
     <div fit="true">
        <form id="addForm"  method="post" >
            <input type="hidden" id="idId"  name="id" />   
            <table>
		        <tr>
		             <td align="left">书名</td>
		             <td><input id="name" class="easyui-validatebox" data-options="required:true"  name="name" style="width:300px"></input></td>
		        </tr>	
		        <tr>
		             <td align="left">章节</td>
		             <td><input id="chapter" class="easyui-validatebox" data-options="required:true"  name="chapter" style="width:300px"></input></td>
		        </tr>
		        <tr>
		             <td align="left">状态</td>
		             <td>
		             <select class="easyui-combobox" id="status" name="status" panelHeight="auto" style="width:155px" data-options="required:true">
	                	<option value="1" selected>启用</option>
	                	<option value="0" >关闭</option>
		             </select>
		             </td>
		        </tr>	
           </table>
        </form>
        <div style="padding: 25px; text-align: center;">
            <a href="#" class="easyui-linkbutton" onclick="cancel();">取消</a>
            <a href="#" class="easyui-linkbutton"  onclick="save();">保存</a> 
        </div>
    </div>
</div>

<div id="showWin" class="easyui-window" title="书籍管理|excel查看" closed="true" collapsible="false" minimizable="false"  maximizable="false" style="width:800px;height:510px"   
        data-options="iconCls:'icon-save',modal:true">
     <div fit="true">
      <input type="hidden" id="counter" style="width: 155px;"/>
      <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="doUpdate();">更新入库</a>
    <table id="tbExcel" title="excel书籍管理 " rownumbers="true" 
	singleSelect="false" pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]">  
    <thead>
        <tr>
            <th align="center" width="20%" field="mark">mark</th>
		    <th align="center" width="20%" field="name">书名</th>
		    <th align="center" width="10%" field="chapter">章节</th>
		    <th align="center" width="10%" field="totalMoney">总金额</th>
        </tr>
    </thead>   
	</table>
</div>

</body>
</html>